package Content;
import java.io.File;
import java.util.ArrayList;
import java.util.List;

/**
 * TCSS 360 - Winter 2014
 * TESK Software
 */

/**
 * Represents a program chair object.
 * 
 * @author Emily Linniman
 * @version March 3, 2014
 *
 */
public class ProgramChair extends User {

	/** A string representing the program chair. */
	private final static String PROGRAM_CHAIR = "Program Chair";
	
	/** A list of the recommendations for the papers the chair is in charge of. */
	private List<File> recommendationList;
	
	/** A list of papers the chair is in charge of. */
	private List<Paper> paperList;
	
	/** 
	 * Constructs a program chair object.
	 * 
	 * @param the_name the name of the program chair
	 * @param the_password the password of the program chair
	 * @param the_role 
	 */
	public ProgramChair(String the_name, String the_password) {
		super(the_name, the_password, PROGRAM_CHAIR);
		recommendationList = new ArrayList<File>();
		paperList = new ArrayList<Paper>();
	}

	/**
	 * Downloads the recommendations for the papers of the program chair. 
	 * @return the list of recommendations
	 */
	public List<File> downloadRecommendations() {
		return recommendationList;
	}
	
	/**
	 * Assigns a subchair to a conference.
	 * @param the_subchair the subchair to be assigned
	 * @param the_conference the conference to assign the subchair to
	 */
	public void assignConference(SubProgramChair the_subchair, Conference the_conference) {
		
	//	the_conference.assignSubChair(the_subchair);
	}
	
	/**
	 * Assigns a paper to a subchair.
	 * 
	 * @param the_paper the paper to be assigned to a subchair
	 * @param the_subchair the subbchair the paper is assigned to
	 */
	public void assignPaper(Paper the_paper, SubProgramChair the_subchair) {
		the_subchair.addPaper(the_paper);
	}
	
	/**
	 * Accesses the list of papers for the conference.
	 * 
	 * @param the_conference the conference to obtain the papers from
	 */
	public void getPaperList(Conference the_conference) {
		paperList = the_conference.getPapers();
	}
	
	/**
	 * Makes a final decision as to approve or reject the paper.
	 * 
	 * @param the_paper the paper to make the decision on
	 * @param the_decision true if accepting the paper, false otherwise
	 */
	public void makeDecision(Paper the_paper, Boolean the_decision) {
		the_paper.setRecommend(the_decision);
	}
	
}
